<?php

namespace app\modules\admin;
use app\models\Admin;
use Yii;
use yii\helpers\ArrayHelper;

/**
 * admin module definition class
 */
class Module extends \yii\base\Module
{
	/**
	 * @inheritdoc
	 */
	public $controllerNamespace = 'app\modules\admin\controllers';

	//public $defaultRoute = 'index';

	//public $layout = '_adminlte.php';

	/**
	 * @inheritdoc
	 */
	public function init()
	{
		parent::init();
		Yii::$app->homeUrl = '/admin/index/index';
		Yii::$app->errorHandler->errorAction = 'admin/default/error';
		Yii::$app->user->identityClass = Admin::className();
		Yii::$app->user->loginUrl = '/admin/default/login';


		// custom initialization code goes here
	}
}
